home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / misc / zxam16b.lha / ZXAM Spectrum / zxam_rexx / English / LoadScreen.zxam < prev    next >
Encoding:
Text File  |  1995-01-17  |  736 b   |  27 lines

  1. /* this scrip loads a spectrum screen (files .scr saved by "Z80") */
  2.     
  3.     /* test if emulator is present */
  4.     address command
  5.     
  6.     if ~show(ports,ZXAM_REXX) then do
  7.         requestchoice 'title "ZXAM Script error..." body "I can''t find the emulator''s port!!" gadgets "AARGH!"'
  8.         exit
  9.         end
  10.  
  11.     /* LOAD requester */
  12.     oldpath=zxamactloadpath()
  13.     oldpattern=zxamactpattern()
  14.     zxampattern('#?.scr')
  15.     nombre=zxamloadrequester('Select the .scr file...')
  16.     zxamloadpath(oldpath)
  17.     zxampattern(oldpattern)
  18.     if nombre='' then exit 0    /* CANCEL */
  19.     
  20.     pantalla=zxampploadfile(nombre)    /* load the whole file */
  21.  
  22.     if length(pantalla)~=6912 then exit   /* test if it's a screen */
  23.     
  24.     zxamputmem(16384,pantalla)    /* place the file in the spectrum's screen */
  25.     
  26.     exit
  27.